home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / Appearance SDK 1.0.4 / Appearance Sample Code / Headers / RIncludes / MacWindows.r < prev    next >
Encoding:
Text File  |  1999-07-16  |  7.2 KB  |  223 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        MacWindows.r
  3.  
  4.      Contains:    Window Manager Interfaces.
  5.  
  6.      Version:    Technology:    Appearance 1.0.2
  7.                  Release:    To be used with Unversal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18.  
  19. #ifndef __MACWINDOWS_R__
  20. #define __MACWINDOWS_R__
  21.  
  22. #ifndef __CONDITIONALMACROS_R__
  23. #include "ConditionalMacros.r"
  24. #endif
  25.  
  26. #define kWindowDefProcType                 'WDEF'
  27. #define kStandardWindowDefinition         0                    /*  for document windows and dialogs */
  28. #define kRoundWindowDefinition             1                    /*  old da-style window */
  29. #define kFloatingWindowDefinition         124                    /*  for floating windows */
  30.  
  31.                                                             /*  for use with kStandardWindowDefinition  */
  32. #define kDocumentWindowVariantCode         0
  33. #define kModalDialogVariantCode         1
  34. #define kPlainDialogVariantCode         2
  35. #define kShadowDialogVariantCode         3
  36. #define kMovableModalDialogVariantCode     5
  37. #define kAlertVariantCode                 7
  38. #define kMovableAlertVariantCode         9                    /*  for use with kFloatingWindowDefinition  */
  39. #define kSideFloaterVariantCode         8
  40.  
  41.                                                             /*  Resource IDs for theme-savvy window defprocs  */
  42. #define kWindowDocumentDefProcResID     64
  43. #define kWindowDialogDefProcResID         65
  44. #define kWindowUtilityDefProcResID         66
  45. #define kWindowUtilitySideTitleDefProcResID  67
  46.  
  47.                                                             /*  Proc IDs for theme-savvy windows  */
  48. #define kWindowDocumentProc             1024
  49. #define kWindowGrowDocumentProc         1025
  50. #define kWindowVertZoomDocumentProc     1026
  51. #define kWindowVertZoomGrowDocumentProc  1027
  52. #define kWindowHorizZoomDocumentProc     1028
  53. #define kWindowHorizZoomGrowDocumentProc  1029
  54. #define kWindowFullZoomDocumentProc     1030
  55. #define kWindowFullZoomGrowDocumentProc  1031
  56.  
  57.                                                             /*  Proc IDs for theme-savvy dialogs  */
  58. #define kWindowPlainDialogProc             1040
  59. #define kWindowShadowDialogProc         1041
  60. #define kWindowModalDialogProc             1042
  61. #define kWindowMovableModalDialogProc     1043
  62. #define kWindowAlertProc                 1044
  63. #define kWindowMovableAlertProc         1045
  64.  
  65.                                                             /*  Proc IDs for top title bar theme-savvy floating windows  */
  66. #define kWindowFloatProc                 1057
  67. #define kWindowFloatGrowProc             1059
  68. #define kWindowFloatVertZoomProc         1061
  69. #define kWindowFloatVertZoomGrowProc     1063
  70. #define kWindowFloatHorizZoomProc         1065
  71. #define kWindowFloatHorizZoomGrowProc     1067
  72. #define kWindowFloatFullZoomProc         1069
  73. #define kWindowFloatFullZoomGrowProc     1071
  74.  
  75.                                                             /*  Proc IDs for side title bar theme-savvy floating windows  */
  76. #define kWindowFloatSideProc             1073
  77. #define kWindowFloatSideGrowProc         1075
  78. #define kWindowFloatSideVertZoomProc     1077
  79. #define kWindowFloatSideVertZoomGrowProc  1079
  80. #define kWindowFloatSideHorizZoomProc     1081
  81. #define kWindowFloatSideHorizZoomGrowProc  1083
  82. #define kWindowFloatSideFullZoomProc     1085
  83. #define kWindowFloatSideFullZoomGrowProc  1087
  84.  
  85. #define kWindowNoPosition                 0x00000000            /*  these are passed into StandardAlert and used in WIND, DLOG, and ALRT templates */
  86. #define kWindowDefaultPosition             0x0000
  87. #define kWindowCenterMainScreen         0x280A
  88. #define kWindowAlertPositionMainScreen     0x300A
  89. #define kWindowStaggerMainScreen         0x380A
  90. #define kWindowCenterParentWindow         0xA80A
  91. #define kWindowAlertPositionParentWindow  0xB00A
  92. #define kWindowStaggerParentWindow         0xB80A
  93. #define kWindowCenterParentWindowScreen  0x680A
  94. #define kWindowAlertPositionParentWindowScreen  0x700A
  95. #define kWindowStaggerParentWindowScreen  0x780A
  96.  
  97.  
  98. /*--------------------------wctb • Window Color Lookup Table--------------------------*/
  99. /*
  100.     wctb_RezTemplateVersion:
  101.         0 - original 
  102.         1 - more color parts and implicit header    <-- default
  103.         2 - addition index table at end
  104. */
  105. #ifndef wctb_RezTemplateVersion
  106.     #ifdef oldTemp                            /* grandfather in use of “oldTemp” */
  107.         #define wctb_RezTemplateVersion 0
  108.     #elif defined(evenNewerTemp)            /* grandfather in use of “evenNewerTemp” */
  109.         #define wctb_RezTemplateVersion 2
  110.     #else
  111.         #define wctb_RezTemplateVersion 1
  112.     #endif
  113. #endif
  114.  
  115.  
  116. type 'wctb' {
  117. #if wctb_RezTemplateVersion == 0
  118.             unsigned hex longint;                                    /* ctSeed                */
  119.             integer;                                                /* ctFlags                */
  120. #elif wctb_RezTemplateVersion == 1
  121.             unsigned hex longint = 0;                                /* ctSeed                */
  122.             integer = 0;                                            /* ctFlags                */
  123. #elif wctb_RezTemplateVersion == 2
  124.             unsigned hex longint = 0;                                /* ctSeed                */
  125.             integer = 1;                                            /* ctFlags                */
  126. #endif
  127.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  128.             wide array ColorSpec {
  129.                     integer        wContentColor,                        /* value                */
  130.                                 wFrameColor,
  131.                                 wTextColor,
  132.                                 wHiliteColor,
  133.                                 wTitleBarColor,
  134.                                 wHiliteLight,
  135.                                 wHiliteDark,
  136.                                 wTitleBarLight,
  137.                                 wTitleBarDark,
  138.                                 wDialogLight,
  139.                                 wDialogDark,
  140.                                 wTingeLight,
  141.                                 wTingeDark;
  142.                     unsigned integer;                                /* RGB:    red                */
  143.                     unsigned integer;                                /*        green            */
  144.                     unsigned integer;                                /*        blue            */
  145.             };
  146. #if wctb_RezTemplateVersion == 2
  147.             integer = $$Countof(IndexTable) - 1;                    /* indexTableSize        */
  148.             array IndexTable {
  149.                     integer        wActiveContentIndex,                /* indexTable            */
  150.                                 wActiveFrameIndex,
  151.                                 wActiveTitleTextIndex,
  152.                                 wActiveTitleBarIndex,
  153.                                 wActiveGrowBorderIndex,
  154.                                 wActiveTitleBarLightTingeIndex,
  155.                                 wActiveTitleBarDarkTingeIndex,
  156.                                 wActiveModalLightTingeIndex,
  157.                                 wActiveModalDarkTingeIndex,
  158.                                 wActiveModalCornerTingeIndex,
  159.                                 wRacingStripesIndex,
  160.                                 wInactiveContentIndex,
  161.                                 wInactiveFrameIndex,
  162.                                 wInactiveTitleTextIndex,
  163.                                 wInactiveTitleBarIndex,
  164.                                 wInactiveGrowBorderIndex,
  165.                                 wInactiveTitleBarLightTingeIndex,
  166.                                 wInactiveTitleBarDarkTingeIndex,
  167.                                 wInactiveModalLightTingeIndex,
  168.                                 wInactiveModalDarkTingeIndex,
  169.                                 wInactiveModalCornerTingeIndex;
  170.             };
  171. #endif
  172.     };
  173.  
  174.  
  175. /*----------------------------WIND • Window Template------------------------------------*/
  176. /*
  177.     WIND_RezTemplateVersion:
  178.         0 - original                             <-- default
  179.         1 - additional positioning info at end    
  180. */
  181. #ifndef WIND_RezTemplateVersion
  182.     #define WIND_RezTemplateVersion 1
  183. #endif
  184.  
  185.  
  186. type 'WIND' {
  187.         rect;                                                    /* boundsRect            */
  188.         integer         documentProc,                            /* procID                */
  189.                         dBoxProc,
  190.                         plainDBox,
  191.                         altDBoxProc,
  192.                         noGrowDocProc,
  193.                         movableDBoxProc,
  194.                         zoomDocProc = 8,
  195.                         zoomNoGrow = 12,
  196.                         rDocProc = 16;
  197.         byte            invisible, visible;                     /* visible                */
  198.         fill byte;
  199.         byte            noGoAway, goAway;                        /* goAway                */
  200.         fill byte;
  201.         unsigned hex longint;                                    /* refCon                */
  202.         pstring         Untitled = "Untitled";                /* title                */
  203.         
  204. #if WIND_RezTemplateVersion == 1
  205.     /*    The following are window positioning options used by System 7.0 and later */
  206.         align word;
  207.         unsigned integer                noAutoCenter = 0x0000,
  208.                                         centerMainScreen = 0x280a,
  209.                                         alertPositionMainScreen = 0x300a,
  210.                                         staggerMainScreen = 0x380a,
  211.                                         centerParentWindow = 0xa80a,
  212.                                         alertPositionParentWindow = 0xb00a,
  213.                                         staggerParentWindow = 0xb80a,
  214.                                         centerParentWindowScreen = 0x680a,
  215.                                         alertPositionParentWindowScreen = 0x700a,
  216.                                         staggerParentWindowScreen = 0x780a;
  217. #endif
  218. };
  219.  
  220.  
  221. #endif /* __MACWINDOWS_R__ */
  222.  
  223.